package cn.xopencode.recordservice.convert.kvtransformer;


import cn.xopencode.common.framework.vo.PageResult;
import cn.xopencode.recordservice.dal.mysql.dataobject.kvtransformer.KvTransformerRecordDO;
import cn.xopencode.recordservice.rpc.kvtransformer.dto.KvTransformerRecordCreateDTO;
import cn.xopencode.recordservice.rpc.kvtransformer.dto.KvTransformerRecordDTO;
import cn.xopencode.recordservice.rpc.kvtransformer.dto.KvTransformerRecordPageDTO;
import cn.xopencode.recordservice.rpc.kvtransformer.dto.KvTransformerRecordUpdateDTO;
import cn.xopencode.recordservice.rpc.kvtransformer.vo.KvTransformerRecordPageVO;
import cn.xopencode.recordservice.rpc.kvtransformer.vo.KvTransformerRecordUpdateVO;
import cn.xopencode.recordservice.service.kvtransformer.bo.KvTransformerRecordBO;
import cn.xopencode.recordservice.service.kvtransformer.bo.KvTransformerRecordCreateBO;
import cn.xopencode.recordservice.service.kvtransformer.bo.KvTransformerRecordPageBO;
import cn.xopencode.recordservice.service.kvtransformer.bo.KvTransformerRecordUpdateBO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface KvTransformerRecordConvert {

    KvTransformerRecordConvert INSTANCE = Mappers.getMapper(KvTransformerRecordConvert.class);

    KvTransformerRecordDO convert(KvTransformerRecordCreateBO bean);

    KvTransformerRecordUpdateVO convertUpdate(KvTransformerRecordDO bean);

    KvTransformerRecordCreateBO convert(KvTransformerRecordCreateDTO bean);

    KvTransformerRecordUpdateBO convert(KvTransformerRecordUpdateDTO bean);

    KvTransformerRecordDO convert(KvTransformerRecordUpdateBO bean);

    KvTransformerRecordBO convert(KvTransformerRecordDTO bean);

    List<KvTransformerRecordBO> convertList(List<KvTransformerRecordDO> list);

    KvTransformerRecordPageBO convert(KvTransformerRecordPageDTO bean);

    @Mapping(source = "records", target = "list")
    PageResult<KvTransformerRecordPageVO> convert(IPage<KvTransformerRecordDO> recordDOIPage);
}
